package communication;

import meterAPI.Communicator;

/**
 * Uses the Communicator object to send messages
 * @author Pavel
 *
 */
public class Sender {

	private Communicator communicator;

	public Sender(Communicator communicator) {
		this.communicator = communicator;
	}

	public synchronized boolean send(String message) throws Exception {
		
		System.out.println("[SmartMeter] Sending message: " + message);
		communicator.sendMessage(message);
		return true;
	}

}
